package com.gill.touka.controller;

import com.gill.touka.auth.CheckLogin;
import com.gill.touka.domain.dto.ShareDTO;
import com.gill.touka.service.ShareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/shares")
public class ShareController {

    @Autowired
    private ShareService shareService;

    /**
     * 需要发送http请求调用用户服务，获取用户的昵称
     */
    @CheckLogin
    @GetMapping("/{id}")
    public ShareDTO findById(@PathVariable Integer id){
        return shareService.findById(id);
    }



}
